import {
    cityId,
    cityName,
    cityPy
} from './CityList'
const defaultState={
    cityId: 0,
    cityName: '全国',
    cityPy: ''
}

export default (state=defaultState,action)=>{
    switch(action.type){
        case 'cityId':
            return {
                ...state,
                cityId: action.data
            }
        case 'cityName': 
            return {
                ...state,
                cityName: action.data
            }
        case 'cityPy': {
            return {
                ...state,
                cityPy: action.data
            }
        }
        default:
            return state;
    }
}